//选择文件部分的函数操作，需要将自身对象及ids列表作为参数进行传递
function uploaderFun(){
	var btn = $(this);
	var ids = "";
	if($(this).next().val().trim().length!=0){
		ids = "&ids=" + $(this).next().val();
	}
	
	var dialog = parent.fw.modalDialog({
        title: '选择文件',
        url: '?action=uploader.uploader' + ids,
        width:700,
        height:500,
        buttons: [
        {
            text: '确认选择',
            handler: function() {
               dialog.find('iframe').get(0).contentWindow.submitForm(dialog, btn);
            }
        },
        {
            text: '清除文件',
            handler: function() {
               dialog.find('iframe').get(0).contentWindow.clearSelectedFiles(dialog,btn);
            }
        },
        {
            text: '关闭窗口',
            handler: function() {
               dialog.find('iframe').get(0).contentWindow.closeDialog(dialog);
            }
        }]
    });
}

//切换文本框及编辑器的操作
function EditorRender(obj,thisObj){
	//动态变量赋值
	eval("obj_editor='"+obj+"editor';"); 
	obj_editor = UE.getEditor(obj);
	if(thisObj.attr("mode") == 1){
		obj_editor.destroy();
   	 	obj_editor = null;
   	 	thisObj.attr("mode",0);
   	 	thisObj.val('切换至编辑器');
    }else{
    	thisObj.attr("mode",1);
    	thisObj.val('切换至编辑框');
    }
}